import { createStore,combineReducers } from 'redux' 
import {Reducer} from './CouterReducer'
import {todoReducer} from './todoReducer'

//创建store函数  需要两个参数
//store包含两部分  所有的reducer 所有组件的state
//参数1：合并后的reducer
//参数2：state

const rootReducer = combineReducers({//合并所有reducer
    Reducer,
    todoReducer
})

const selfState = {

}

const store = createStore(rootReducer,selfState)


export default store;